package com.hz.springboot02.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hz.springboot02.pojo.Provider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ProviderMapper extends BaseMapper<Provider> {
    /**
     * 多条件分页查询
     * @return list
     */
    public List<Provider> listPage(@Param("pyl") Integer pyl,
                                   @Param("limit") Integer limit,
                                   @Param("proCode") String proCode,
                                   @Param("proName")String proName,
                                   @Param("proDesc")String proDesc,
                                   @Param("beginDate")String beginDate,
                                   @Param("endDate") String endDate);

    /**
     * 供应商信息总记录数
     * @return
     */
    public int sumNo(@Param("proCode") String proCode,
                     @Param("proName")String proName,
                     @Param("proDesc")String proDesc,
                     @Param("beginDate")String beginDate,
                     @Param("endDate") String endDate);

    /**
     * 批量删除供应商
     * @param ids
     * @return
     */
    public int delIds(@Param("list") List<Integer> ids);
    @Select("select * from smbms_provider")
    public List<Provider> proList();
}
